// import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from 'typeorm';
// import { UserAccount } from './user_account.entity'

// @Entity()
// export class Article {
//     @PrimaryGeneratedColumn({ type: 'int', comment: '文章id' })
//     id: number

//     @Column({ length: 255, type: String, nullable: false, comment: "用户id" })
//     user_id: number;

//     @Column({ length: 255, type: String, nullable: false, comment: "文章标题" })
//     title: string;

//     @Column({ length: 255, type: String, nullable: false, comment: "文章内容" })
//     content: string;

//     @Column({ type: String, nullable: false, comment: "文章标签" })
//     tags: Array<string>;

//     @Column({ length: 255, type: String, nullable: false, comment: "文章分类" })
//     category: string;

//     @Column({ length: 255, type: String, nullable: false, comment: "文章作者" })
//     author: string;

//     @Column({ length: 255, type: String, nullable: false, comment: "文章状态", default: "待审核" })
//     status: string;

//     @Column({ type: Number, nullable: false, comment: "文章浏览量", default: 0 })
//     views: number;

//     @Column({ type: Number, nullable: false, comment: "文章点赞量", default: 0 })
//     likes: number;

//     // @Column({ length: 255, type: String, comment: "文章收藏量" })
//     // collections: string;

//     @Column({ type: 'timestamp', nullable: false, comment: "文章创建时间" })
//     createTime: Date;

//     @Column({ type: 'timestamp', nullable: true, comment: "文章更新时间" })
//     updateTime: Date;


//     @ManyToOne(type=>UserAccount,userAccount=>userAccount.articles)
//     @JoinColumn()
//     userAccount: UserAccount
// }
